$(document).ready(
	function(){
//	    //��ʼ���˵�
	    $('ul.top_ul').superfish();
//
//	    if (!$.cookie('bread_crumbs')) 
//	    {
//		$.cookie('bread_crumbs', '��ҳ');
//	    }
	    
//	    $("#bread_crumbs span").html($.cookie('bread_crumbs'));
});

/**
 * ��������浽cookie����
 * @param nodeId
 * @param nodeName
 * @param parentId
 * @param url
 */
function openMenu(nodeId, nodeName, parentId, url) {
    
    var nameArray=new Array()
    var i=1;
    nameArray[0] = nodeName;
    while(nodeId != 0)
    {
	nodeId = $("li[node_id='" + nodeId + "']").attr("parent_id");
	if(nodeId == "0")
	{
	    break;
	}
	nameArray[i] = $("li[node_id='" + nodeId + "']").attr("node_name");
	i++;
    }
    
    var strName = "��ҳ > ";
    for(var i=nameArray.length-1; i>=0; i--)
    {
	strName += nameArray[i]+" > ";
    }
    
    if(url) 
    {
	$.cookie('bread_crumbs', strName.substring(0, strName.length-3),{path: '/'});
	window.open(url, "_self");
    }
}

